package com.implementsfaces.service;

import org.springframework.util.ClassUtils;
import java.util.List;
import com.bean.${beanname};
import com.util.PaginatedList;
import com.interfaces.dao.I${beanname}DAO;
import com.interfaces.service.I${beanname}Service;

/**
 * 
 * <p>功能描述:${description}</p>
 * @author  <a href="mailto: name@yourcompany.com">yourname</a>
 * @create_date 时间格式：2008-11-4
 * @version $ Revision: 1.0
 */
@SuppressWarnings("serial")
public class ${beanname}ServiceImp implements I${beanname}Service{

	/*
	 * {beanname}dao属性注入
	 */
	private I${beanname}DAO ${objectname}DAO;
	
	/**
	 * 
	 * <p>功能描述：添加方法</p>
	 * @return
	 * @author:yourname
	 * @update:[日期YYYY-MM-DD][更改人姓名][变更描述]
	 */
	public Long doinsert${beanname}(${beanname} ${objectname}){
		return ${objectname}DAO.doinsert${beanname}(${objectname});
	}
	
	/**
	 * 
	 * <p>功能描述：删除方法</p>
	 * @return
	 * @author:yourname
	 * @update:[日期YYYY-MM-DD][更改人姓名][变更描述]
	 */
	public boolean dodelete${beanname}(List ids){
		return ${objectname}DAO.dodelete${beanname}(ids);
	}
	
	/**
	 * 
	 * <p>功能描述：修改方法</p>
	 * @return
	 * @author:yourname
	 * @update:[日期YYYY-MM-DD][更改人姓名][变更描述]
	 */
	public boolean doupdate${beanname}(${beanname} ${objectname}){
		return ${objectname}DAO.doupdate${beanname}(${objectname});
	}
	
	/**
	 * 
	 * <p>功能描述：list方法</p>
	 * @return
	 * @author:yourname
	 * @update:[日期YYYY-MM-DD][更改人姓名][变更描述]
	 */
	public PaginatedList<${beanname}> get${beanname}List(${beanname} ${objectname}, int pageIndex, int pageSize){
		return ${objectname}DAO.get${beanname}List(${objectname}, pageIndex, pageSize);
	}
	
	public List get${beanname}s(${beanname} ${objectname}){
		return ${objectname}DAO.get${beanname}s(${objectname});
	}
	
	public ${beanname} get${beanname}(${beanname} ${objectname}){
		return ${objectname}DAO.get${beanname}(${objectname});
	}
	
	public I${beanname}DAO get${beanname}DAO() {
		return ${objectname}DAO;
	}

	public void set${beanname}DAO(I${beanname}DAO ${objectname}DAO) {
		this.${objectname}DAO = ${objectname}DAO;
	}

}
